// 1431. 拥有最多糖果的孩子

#include <vector>
#include <iostream>
using namespace std;

class Solution 
{
public:
    vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) 
    {
        vector<bool> ret;
        int maxCandies = INT_MIN;
        for(auto& e : candies) if(e > maxCandies) maxCandies = e;

        for(auto e : candies)
        {
            if(e + extraCandies >= maxCandies) ret.push_back(true);
            else ret.push_back(false);
        }

        return ret;
    }
};